<?xml version="1.0" encoding="UTF-8" ?>
<!--
 *************************************************************************
 * The contents of this file are subject to the Openbravo  Public  License
 * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
 * Version 1.1  with a permitted attribution clause; you may not  use this
 * file except in compliance with the License. You  may  obtain  a copy of
 * the License at http://www.openbravo.com/legal/license.html
 * Software distributed under the License  is  distributed  on  an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
 * License for the specific  language  governing  rights  and  limitations
 * under the License.
 * The Original Code is Openbravo ERP.
 * The Initial Developer of the Original Code is Openbravo SLU
 * All portions are Copyright (C) 2010-2011 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 *************************************************************************
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Select Expected Payments</title>
<link rel="shortcut icon" href="../../../../../web/images/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="../../../../../web/skins/Default/Openbravo_ERP_250.css" id="paramCSS"></link>

<script language="JavaScript" type="text/javascript" id="paramDirectory">
  var baseDirectory = "../../../../../web/";
</script>
<script language="JavaScript" src="../../../../../web/js/messages.js" type="text/javascript"></script>
<script language="JavaScript" src="../utility/DynamicJS.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript" id="paramLanguage">
  var defaultLang = "en_US";
</script>
<script language="JavaScript" src="../../../../../web/js/shortcuts.js" type="text/javascript"></script>
<script language="JavaScript" src="../../../../../web/js/utils.js" type="text/javascript"></script>
<script language="JavaScript" src="../../../../../web/js/windowKeyboard.js" type="text/javascript"></script>
<script language="JavaScript" src="../../../../../web/js/searchs.js" type="text/javascript"></script>
<script language="JavaScript" src="../../../../../web/js/ajax.js" type="text/javascript"></script>
<script language="JavaScript" src="../../../../../web/js/default/MessageBox.js" type="text/javascript"></script>
<script language="JavaScript" src="../../../../../web/js/messages.js" type="text/javascript"></script>
<script language="JavaScript" src="../utility/DynamicJS.js" type="text/javascript"></script>
<script language="JavaScript" src="../../../../../web/org.openbravo.userinterface.selector/js/classic-skin-variable.js" type="text/javascript"></script>
<script language="JavaScript" src="../../../../../web/../org.openbravo.client.kernel/OBCLKER_Kernel/StaticResources" type="text/javascript"></script>
<script language="JavaScript" src="../../../../../web/js/calculator.js" type="text/javascript"></script>
<script language="JavaScript" src="../../../../../web/js/jscalendar/calendar.js" type="text/javascript"></script>
<script language="JavaScript" src="../../../../../web/js/jscalendar/lang/calendar-es.js" type="text/javascript" id="fieldCalendar"></script>
<script language="JavaScript" src="../../../../../web/js/default/DateTextBox.js" type="text/javascript"></script>
<script language="JavaScript" src="../../../../../web/org.openbravo.advpaymentmngt/FIN_Utilities.js" type="text/javascript"></script>
<script type="text/javascript">
  window.onunload = reloadOpener; // reloads opener on closing
</script>

<script language="JavaScript" type="text/javascript">
function validate(action) {
  var frm = document.frmMain;
  if (action=='SAVE') {
    if (frm.inpActualPayment.value==null || frm.inpActualPayment.value=="") {
      setWindowElementFocus(frm.inpActualPayment);
      showJSMessage(7);
      return false;
    } else {
      var diffAction = frm.inpDifferenceAction, i,
                       selectedAction, isActionSelected = false;
      for (i = 0; i < diffAction.length; i++) {
        if (diffAction[i].checked) {
          isActionSelected = true;
          break;
        }
      }
      if (isActionSelected) {
        selectedAction = diffAction[i].value;
      }
      
      var chk = frm.inpScheduledPaymentDetailId;
      if (!chk) return true;
      else if (!chk.length) {
        if (chk.checked) {
          var pendingAmount = document.frmMain.elements["inpRecordAmt"+chk.value].value;
          var amount = document.frmMain.elements["inpPaymentAmount"+chk.value].value;
          // Only possible to pay 0 in case of a write off
          if (selectedAction != "writeoff" && compare(amount, '==', 0)) {
            setWindowElementFocus(frm.elements["inpPaymentAmount"+chk.value]);
            showJSMessage(9);
            return false;
          }
          if (amount==null || amount=="") {
            setWindowElementFocus(frm.elements["inpPaymentAmount"+chk.value]);
            showJSMessage(7);
            return false;
          }
          if ( compare(pendingAmount, '<', amount) ) {
            setWindowElementFocus(frm.elements["inpPaymentAmount"+chk.value]);
            showJSMessage(9);
            return false;
          }
        }
      } else {
        var total = chk.length;
        for (var i=0;i<total;i++) {
          if (chk[i].checked ) {
            var pendingAmount = document.frmMain.elements["inpRecordAmt"+chk[i].value].value;
            var amount = document.frmMain.elements["inpPaymentAmount"+chk[i].value].value;
            // Only possible to pay 0 in case of a write off
            if (selectedAction != "writeoff" && compare(amount, '==', 0)) {
              setWindowElementFocus(frm.elements["inpPaymentAmount"+chk[i].value]);
              showJSMessage(9);
              return false;
            }
            if (amount==null || amount=="") {
              setWindowElementFocus(frm.elements["inpPaymentAmount"+chk[i].value]);
              showJSMessage(7);
              return false;
            }
            if ( compare(pendingAmount, '<', amount) ) {
              setWindowElementFocus(frm.elements["inpPaymentAmount"+chk[i].value]);
              showJSMessage(9);
              return false;
            }
          }
        }
      }
    }
  }
  return true;
}
</script>
<script language="JavaScript" type="text/javascript">
function closeThisPage() {
   closePage();
    return true;
}
function submitThisPage(strCommand) {
  if (validate(strCommand)) {
    submitCommandForm(strCommand, false, null, null);
    return true;
  }
  return true;
}

function updateData(key, mark) {
  if (mark==null) mark=false;
  updateReadOnly(key, mark);
  var paymentAmount = document.frmMain.elements['inpPaymentAmount'+key];
  if (!isTrue('isReceipt')){
    if (mark && paymentAmount.value=='') {
      paymentAmount.value = document.frmMain.elements['inpRecordAmt'+key].value;
      paymentAmountOnChange(paymentAmount);
    }
  }
  updateTotal();

  if (!mark) { // Clear difference td
    var selTd = getElementsByName("inpDifference"+key, "td");
    selTd[0].innerHTML = '';
  }

  return true;
}

function paymentAmountOnChange(element){
  updateDiffinTable(element);
  updateTotal();
}
function updateDiffinTable(element){
  var diffRowId = element.getAttribute('name').replace('inpPaymentAmount','');
  var amount = document.frmMain.elements["inpPaymentAmount"+diffRowId].value;
  var outstanding = document.frmMain.elements["inpRecordAmt"+diffRowId].value;
  var selTd = getElementsByName("inpDifference"+diffRowId, "td");
  selTd[0].innerHTML = subtract(outstanding, amount ? amount : 0);
}

</script>
<script language="JavaScript" type="text/javascript">
    function loadGridList() {
      try {
        var url = "../org.openbravo.advpaymentmngt.ad_actionbutton/SelectExpectedPayments.html";
        var paramXMLReq = null;
        return submitXmlHttpRequest(callBackGrid, document.frmMain, "GRIDLIST", url, false, null, paramXMLReq);
      } catch (e) {
        alert(e);
      }
    }

    function callBackGrid(paramXMLParticular, XMLHttpRequestObj) {
     var strText = "";
      if (getReadyStateHandler(XMLHttpRequestObj)) {
        try {
          if (XMLHttpRequestObj.responseText) {
            strText = XMLHttpRequestObj.responseText;
            var aux = strText.substring(29, strText.length-8);
            var tableBody = document.getElementById('sectionGrid');
            var browserName = getBrowserInfo('name');
            if (browserName.toUpperCase().indexOf('INTERNET EXPLORER') != -1) {
              var temp = document.createElement("span");
              temp.id = 'temp';
              temp.style.display = 'none';
              var newRows = '<table><tbody id=\"sectionGrid\">'+ aux;
              temp.innerHTML = newRows;
              tableBody.parentNode.replaceChild(temp.firstChild.firstChild, tableBody);
              temp.parentNode.removeChild(temp);
            }
            tableBody.innerHTML = aux;
            
            updateAll();
            updateTotal();
          } else {
            document.getElementById('sectionGrid').innerHTML = '';
          }
        } catch (e) {
        }
      }
      return true;
    }
</script>
<script language="JavaScript" type="text/javascript">
  function onLoadDo(){
    this.windowTables = new Array(
      new windowTableId('client_top', 'buttonProcess'),
      new windowTableId('client_middle', 'buttonProcess'),
      new windowTableId('client_botton', 'buttonProcess')
    );

    setWindowTableParentElement();
    enableShortcuts('popup');
    setBrowserAutoComplete(false);

    initFIN_Utilities(document.frmMain);
    try {
      onloadFunctions();
    } catch (e) {}
    displayLogicElement('sectionDifference', false);
    displayLogicElement('sectionDifferenceBox', false);
    processLabels()

    loadGridList();
    setWindowElementFocus('firstElement');
    resizeAreaCreateFrom();
  }

  function onResizeDo(){
    resizeAreaCreateFrom(true);
  }
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="onLoadDo();" onresize="onResizeDo();">
<form name="frmMain" method="post" action="SelectExpectedPayments.html">
  <input type="hidden" name="Command" />
  <input type="hidden" name="IsPopUpCall" value="1" />
  <input type="hidden" name="inpadOrgId" value="" id="fieldOrg"/>
  <input type="hidden" name="inpfinPaymentProposalId" value="" id="fieldPaymentProposal"/>
  <input type="hidden" name="inpadWindowId" value="" id="fieldWindowId"/>
  <input type="hidden" name="inpTabId" value="" id="fieldTabId"/>
  <input type="hidden" name="isReceipt" value="" id="fieldReceipt"/>
  <input type="hidden" name="isFirstLoad" value="true"/>
  <input type="hidden" name="inpExpectedPayment" value=""/>
  <input type="hidden" name="inpActualPayment" value=""/>
  <input type="hidden" name="inpUseCredit" value="N"/>
  <input type="hidden" name="inpCurrencyId" value="2" id="paramCurrency"/>
  <input type="hidden" name="curPrecision" value="2" id="paramPrecision"/>
  <div class="Popup_ContentPane_CircleLogo">
    <div class="Popup_WindowLogo">
      <img class="Popup_WindowLogo_Icon Popup_WindowLogo_Icon_process" src="../../../../../web/images/blank.gif" border=0/></img>
    </div>
  </div>
  <table cellspacing="0" cellpadding="0" width="100%" id="table_header">
    <tr>
      <td>
        <table cellspacing="0" cellpadding="0" class="Popup_ContentPane_NavBar">
          <tr class="Popup_NavBar_bg"><td></td>
            <td class="Popup_NavBar_separator_cell"></td>
            <td class="Popup_NavBar_bg_logo_left"></td>
            <td class="Popup_NavBar_bg_logo" width="1" onclick="openNewBrowser('http://www.openbravo.com', 'Openbravo');return false;"><img src="../../../../../web/images/blank.gif" alt="Openbravo" title="Openbravo" border="0" id="openbravoLogo" class="Popup_NavBar_logo" /></td>
            <td class="Popup_NavBar_bg_logo_right"></td>
            <td class="Popup_NavBar_Popup_title_cell"><span id="paramTitle">xxSelect Expected Payments</span></td>
            <td class="Popup_NavBar_separator_cell"></td>
          </tr>
        </table>
      </td>
    </tr>

    <tr>
      <td>
        <table cellspacing="0" cellpadding="0" class="Popup_ContentPane_SeparatorBar">
          <tr>
            <td class="Popup_SeparatorBar_bg"></td>
          </tr>
        </table>
      </td>
    </tr>

  </table>
  <table cellspacing="0" cellpadding="0" width="100%">
    <tr>
      <td>
        <div class="Popup_ContentPane_Client" style="overflow: auto;" id="client_messagebox">

          <!-- MessageBox -->
          <table cellpadding="0" cellspacing="0" id="messageBoxID" class="MessageBoxyy">
            <tbody>
            <tr class="MessageBox_TopMargin">
              <td class="MessageBox_LeftMargin"></td>
              <td></td>
              <td class="MessageBox_RightMargin"></td>
            </tr>
            <tr>
              <td class="MessageBox_LeftMargin"></td>
              <td>

                <table cellpadding="0" cellspacing="0" class="MessageBox_Container">
                  <tbody>
                  <tr>
                    <td class="MessageBox_LeftTrans">
                      <table style="width: 100%; height: 100%" cellpadding="0" cellspacing="0">
                        <tbody>
                        <tr>
                          <td class="MessageBox_TopLeft"></td>
                        </tr>
                        <tr>
                          <td class="MessageBox_Left"></td>
                        </tr>
                        </tbody>
                      </table>
                    </td>
                    <td class="MessageBox_bg">

                      <table class="MessageBox_Top">
                      <tbody>
                        <tr>
                          <td>
                            <span>
                            <table cellpadding="0" cellspacing="0" class="MessageBox_Body_ContentCell">
                              <tbody>
                              <tr>
                                <td class="MessageBox_Icon_ContentCell">
                                  <div class="MessageBox_Icon"></div>
                                </td>
                                <td style="vertical-align: top;" id="messageBoxIDContent">
                                  <span>
                                    <div class="MessageBox_TextTitle" id="messageBoxIDTitle">
                                      xxInfo: AccessTableWithNoView
                                    </div>
                                    <div class="MessageBox_TextDescription" id="messageBoxIDMessage">
                                      xxThe current information is empty.
                                    </div>
                                    <div class="MessageBox_TextSeparator"></div>
                                  </span>
                                </td>
                              </tr>
                              </tbody>
                            </table>
                            </span>
                          </td>
                        </tr>
                        </tbody>
                      </table>

                    </td>
                    <td class="MessageBox_RightTrans">
                      <table style="width: 100%; height: 100%" cellpadding="0" cellspacing="0">
                        <tbody>
                        <tr>
                          <td class="MessageBox_TopRight"></td>
                        </tr>
                        <tr>
                          <td class="MessageBox_Right"></td>
                        </tr>
                        </tbody>
                      </table>
                    </td>
                  </tr>
                  <tr>
                    <td rowspan="2" class="MessageBox_BottomLeft">
                    </td>
                    <td class="MessageBox_BottomTrans MessageBox_bg">
                    </td>
                    <td rowspan="2" class="MessageBox_BottomRight">
                    </td>
                  </tr>
                  <tr>
                    <td class="MessageBox_Bottom">
                    </td>
                  </tr>
                  </tbody>
                </table>

              </td>
              <td class="MessageBox_RightMargin"></td>
            </tr>
            <tr class="MessageBox_BottomMargin">
              <td class="MessageBox_LeftMargin"></td>
              <td></td>
                <td class="MessageBox_RightMargin"></td>
              </tr>
            </tbody>
          </table>
        <!-- MessageBox END -->
        </div>
      </td>
    </tr>
  </table>

  <table cellspacing="0" cellpadding="0" width="100%">

    <tr>
      <td>
        <div class="Popup_ContentPane_Client" style="overflow: auto;" id="client_top">
          <table cellspacing="0" cellpadding="0" class="Popup_Client_TableSelector">

            <tr>
              <td class="TableEdition_OneCell_width"></td>
              <td class="TableEdition_OneCell_width"></td>
              <td class="TableEdition_OneCell_width"></td>
              <td class="TableEdition_OneCell_width"></td>
              <td class="TableEdition_OneCell_width"></td>
              <td class="TableEdition_OneCell_width"></td>
            </tr>

            <!-- Text -->
            <tr><td colspan="6" class="LabelText" style="font-weight: bold;">
                <span name="lblP" id="lblPText">Select expected payments that you want to put into payment proposal</span>
            </td></tr>
            <tr><td colspan="6" class="LabelText">
                <span name="lblP" id="lblPText">Payment Proposal:</span>&nbsp;<span style="font-weight: bold;" id="paramProposalNo">xxPROP01</span>
            </td></tr>
            <tr><td colspan="6" class="LabelText">
                <span name="lblP" id="lblPText">Payment Method:</span>&nbsp;<span style="font-weight: bold;" id="paramPaymentMethod">xxPROP01</span>
            </td></tr>
            <tr><td colspan="6" class="LabelText">
                <span name="lblP" id="lblPText">Business Partner:</span>&nbsp;<span style="font-weight: bold;" id="paramBusinessPartner">xxPROP01</span>
            </td></tr>
            <tr id="dueDateInfoRow"><td colspan="6" class="LabelText">
                <span name="lblP" id="lblPText">Due Date:</span>&nbsp;<span style="font-weight: bold;" id="paramDueDate">xxPROP01</span>
            </td></tr>
            <tr class="FieldGroup_BottomMargin"></tr>

            <!-- Row 1 -->
            <tr>
              <td class="Radio_Check_ContentCell" colspan="3">
                <span class="Radio_Check_ContentCell Checkbox_container_NOT_Focused"><input type="checkbox" name="inpAlternativePaymentMethod" value="Y" id="paramAlternativePaymentMethod" onclick="loadGridList()"></input></span>
                <span class="TitleCell LabelText"><label for="paramAlternativePaymentMethod">Show payments for alternative payment methods</label></span>
              </td>
              <td class="TableEdition_OneCell_width"></td>
              <td class="TableEdition_OneCell_width"></td>
              <td class="TableEdition_OneCell_width"></td>
            </tr>
            <tr class="FieldGroup_BottomMargin"></tr>

          </table>
        </div>
      </td>
    </tr>
    <tr>
      <td>
        <div class="Popup_ContentPane_Client" style="overflow: auto;" id="client_middle">
          <table height="100%" border="0" cellpadding="0" cellspacing="0" id="main">
            <tr>
              <td valign="top" class="Popup_Client_Selector_DataGrid_LeftMargin">
                <table width="100%" border="0" cellspacing="0" cellpadding="0" id="tdleftSeparator">
                  <tr><td class="Popup_Client_Selector_DataGrid_LeftMargin"></td></tr>
                </table>
              </td>
              <td valign="top">
                <div id="client2" style="overflow: auto;">
                  <table cellspacing="0" cellpadding="0" width="100%" class="DataGrid_Header_Table DataGrid_Body_Table" style="table-layout: auto;">
                    <thead>
                      <tr class="DataGrid_Body_Row">
                        <th class="DataGrid_Header_LineNoCell DataGrid_Body_Cell_CheckBox" width="25"> 
                          <input type="checkbox" name="inpAllLines" onclick="markAll(document.frmMain.inpScheduledPaymentDetailId, this.checked);updateAll();return true;"/>
                        </th>
                        <th class="DataGrid_Header_Cell" width="80">Order No.</th>
                        <th class="DataGrid_Header_Cell" width="80">Invoice No.</th>
                        <th class="DataGrid_Header_Cell" width="110">Payment Method</th>
                        <th class="DataGrid_Header_Cell" width="110">Business Partner</th>
                        <th class="DataGrid_Header_Cell" width="70">Due Date</th>
                        <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="80">Invoiced Amt</th>
                        <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="80">Expected Amt</th>
                        <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="80">Outs. Amt</th>
                        <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="110">Payment</th>
                        <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="80">Difference</th>
                      </tr>
                    </thead>
                    <tbody id="sectionGrid">
                    </tbody>
                  </table>
                  <input type="hidden" id="inpTotal" value="" outputformat="euroEdition"/>
                  <input type="hidden" name="inpDifference" id="inpDifference" value="" outputformat="euroEdition"/>
                  <table cellspacing="0" cellpadding="0" width="100%" class="" style="table-layout: auto;">
                    <tr class="FieldGroup_BottomMargin"></tr>
                    <tr>
                      <td width="710" class="LabelText" style="text-align:right">Total</td>
                      <td width="110" class="LabelText" style="padding-left:10px;font-weight: bold;"><span id="paramTotal"></span></td>
                    </tr>
                    <tr id="sectionDifference">
                      <td class="LabelText" style="text-align:right">There is a difference of</td>
                      <td class="LabelText" style="padding-left:10px;font-weight: bold;"><span id="paramDifference"></span></td>
                    </tr>
                    <tr id="sectionDifferenceBox">
                      <td></td>
                      <td>
                        <table cellspacing="0" cellpadding="0" width="100%" class="" style="border: #888888 2px solid; table-layout: auto;">
                          <tr id="underpayment">
                            <td class="Radio_Check_ContentCell" width="20">
                              <input type="radio" name="inpDifferenceAction" value="underpayment" checked="checked"/>
                            </td>
                            <td><span class="LabelText">Leave this as an underpayment</span></td>
                          </tr>
                          <tr id="credit">
                            <td class="Radio_Check_ContentCell" width="20">
                              <input type="radio" name="inpDifferenceAction" value="credit"/>
                            </td>
                            <td><span class="LabelText">Leave the credit to be used later</span></td>
                          </tr>
                          <tr id="refund">
                            <td class="Radio_Check_ContentCell" width="20">
                              <input type="radio" name="inpDifferenceAction" value="refund"/>
                            </td>
                            <td><span class="LabelText">Refund amount to customer</span></td>
                          </tr>
                          <tr id="writeoff">
                            <td class="Radio_Check_ContentCell">
                              <input type="radio" name="inpDifferenceAction" value="writeoff"/>
                            </td>
                            <td><span class="LabelText">Write off the difference</span></td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </div>
              </td>
              <td valign="top" class="Popup_Client_Selector_DataGrid_RightMargin">
                <table width="100%" border="0" cellspacing="0" cellpadding="0" id="tdrightSeparator">
                  <tr><td class="Popup_Client_Selector_DataGrid_RightMargin"></td></tr>
                </table>
              </td>
            </tr>
            
          </table>
        </div>
      </td>
    </tr>
    
    <tr>
      <td>
        <div class="Popup_ContentPane_Client" style="overflow: auto; padding-bottom: 5px;" id="client_bottom">
          <table cellspacing="0" cellpadding="0" class="Popup_Client_TableSelector">

            <tr>
              <td class="TableEdition_OneCell_width"></td>
              <td class="TableEdition_OneCell_width"></td>
              <td class="TableEdition_OneCell_width"></td>
              <td class="TableEdition_OneCell_width"></td>
              <td class="TableEdition_OneCell_width"></td>
              <td class="TableEdition_OneCell_width"></td>
            </tr>
            <tr>
              <td></td>
              <td></td>
              <td class="Button_RightAlign_ContentCell">
                <div>
                  <button type="button" 
                    id="buttonProcess"
                    class="ButtonLink" 
                    onclick="submitThisPage('SAVE');return false;"
                    onfocus="buttonEvent('onfocus', this); window.status='Create'; return true;"
                    onblur="buttonEvent('onblur', this);"
                    onkeyup="buttonEvent('onkeyup', this);"
                    onkeydown="buttonEvent('onkeydown', this);"
                    onkeypress="buttonEvent('onkeypress', this);"
                    onmouseup="buttonEvent('onmouseup', this);"
                    onmousedown="buttonEvent('onmousedown', this);"
                    onmouseover="buttonEvent('onmouseover', this); window.status='Create'; return true;"
                    onmouseout="buttonEvent('onmouseout', this);">
                    <table class="Button">
                      <tr>
                        <td class="Button_left"><img class="Button_Icon Button_Icon_ok" alt="Process" title="Process" src="../../../../../web/images/blank.gif" border="0" /></td>
                        <td class="Button_text Button_width">Process</td>
                        <td class="Button_right"></td>
                      </tr>
                    </table>
                  </button>
                </div>
              </td>
              <td class="Button_LeftAlign_ContentCell">
                <div>
                  <button type="button" 
                    id="buttonCancel" 
                    class="ButtonLink" 
                    onclick="closeThisPage();return false;"
                    onfocus="buttonEvent('onfocus', this); window.status='Cancel'; return true;"
                    onblur="buttonEvent('onblur', this);"
                    onkeyup="buttonEvent('onkeyup', this);"
                    onkeydown="buttonEvent('onkeydown', this);"
                    onkeypress="buttonEvent('onkeypress', this);"
                    onmouseup="buttonEvent('onmouseup', this);"
                    onmousedown="buttonEvent('onmousedown', this);"
                    onmouseover="buttonEvent('onmouseover', this); window.status='Cancel'; return true;"
                    onmouseout="buttonEvent('onmouseout', this);">
                    <table class="Button">
                      <tr>
                        <td class="Button_left"><img class="Button_Icon Button_Icon_cancel" alt="Cancel" title="Cancel" src="../../../../../web/images/blank.gif" border="0" /></td>
                        <td class="Button_text Button_width">Cancel</td>
                        <td class="Button_right"></td>
                      </tr>
                    </table>
                  </button>
                </div>
              </td>
              <td></td>
              <td></td>
            </tr>
          </table>
        </div>
      </td>
    </tr>
  </table>
</form>
</body>
</html>
